package java8.methodref;

import java.util.function.BiPredicate;
import java.util.function.Supplier;

/**
 * @author 周宇
 * @create 2020-05-19 19:18
 * 对象方法引用
 */
public class ObjectReference {
    public static void main(String[] args) {
        BiPredicate<String, String> biPredicate = (s1, s2) -> s1.equals(s2);
        BiPredicate<String, String> biPredicate2 = String::equals;

        boolean test = biPredicate2.test("xy", "xx");
        System.out.println(test);

        Supplier<String> str = String::new;
        String s = str.get();
    }
}
